Waverider Systems

Perlshop 4 Page Counter DBI Package Version 1.1

Contents


Overview

This plugin requires Perlshop 4.2.06 or later, and is intended for use by customers that already have the PSDBI package installed.

Database tables used by this plugin:

The psdbi.cfg file is used by this plugin to connect to the default database. All page counter data is stored in a table called 'ps_page_count'. This table is expected to have the following form:
create table ps_page_count
(
    page  varchar(40),
    count integer,
    last  varchar(40)
)
Column 'page' contains the name of the html file.
Column 'count' contains the number of times that page has been loaded.
Column 'last' contains the date and time this page was last loaded.


Installing the Page Counter DBI Software

  1. Place the ps_plugin_counter_dbi.pl file into the same web server directory as your perlshop.cgi file.
  2. Give the ps_plugin_counter_dbi.pl file the same file permissions as your perlshop.cgi file.
  3. Add the counter plugin to the plugin registration table in your ps.cfg file.

Example plugin registration table before adding the counter plugin:

%plugins =
(
    # Calendar example plugin
    'calendar' => 
    {
        'program'    => 'ps_plugin_gencal.pl'
    }
);

Example plugin registration table after adding the counter plugin:

%plugins =
(
    # Calendar example plugin
    'calendar' => 
    {
        'program' =>     'ps_plugin_gencal.pl'
    },

    # PSDBI Page Counter plugin
    'page_counter' =>
    {
        'program' =>    'ps_plugin_counter_dbi.pl',
        'event'   =>    'after_page_load'
    }
);

Creating the Database Tables

The database table can be created from the web server command line using this command:
ps_plugin_counter_dbi.pl create

Once created, this table can be cleared from the web server command line using this command:

ps_plugin_counter_dbi.pl clear

Installing the Perlshop Office Page Counter DBI Tools

  1. Place the PSO_PageCounter.pm file into the same web server directory as your psoffice.cgi file.
  2. Give this file the same permissions as your perlshop.cgi file.
  3. Add the Perlshop Office Page Counter DBI plugin to the plugin registration table in your pso.cfg file.
%office_tool_plugins =
(
	# Page Hit report
	'page_hit_report'	=>
	{
		'label'		=>	'Page Hit Report',
		'module'	=>	'PSO_PageCounter.pm'
	}
);

Using the Perlshop Office Page Counter DBI Tools

Once installed, the tools supplied with this Office Plugin will be displayed in the Tools menu of Perlshop Office.

Page Hit Report

This report displays the number of hits made to each page on your web site. Data can be sorted by Page Name, Hit Count, or Last Hit Time.